package com.flycms.module.comment.model;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * <br/>Copyright 2020
 * <br/>All rights reserved
 * @author 沁言訫語
 * @version 2020年3月8日
 * @Date 2020年3月8日
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Comments implements Serializable {

    private static final long serialVersionUID = 1L;
    
    private Integer id; //
    
    @NotNull(message = "评论的内容ID不能为空")
    private Long contentId; //评论的是哪个主题，可以是文章等
    
    private String contentType;
    
    private Long userId; //评论人的ID
    
    private String userName;
    
    private String avatar;
    
    private String title;
    
    @NotBlank(message = "评论不能为空")
    @Size(max = 1000, message = "评论长度不能超过1000")
    private String content; //评论内容
    
    private Integer upCount; //点赞数
    
    private Integer downCount; //点踩数
    
    private Integer reply; //是否为回复别人 0:否 1:是
    
    private Integer replyCommentId;//回复的评论ID
    
    private Long replyUserId; //回复的人的ID
    
    private String replyUserName;
    
    private String replyAvatar;
    
    //评星0.5 - 5.0
    private Float star;
    
    //开启、关闭、锁定、删除、待审核 1、2、3、0、4
    private Integer status;
    
    private Date createTime; //评论时间
    
    private Date updateTime; //最后修改时间
    
}
